#include <stdio.h>
#include <stdlib.h>
#include <glib.h>

int main() {
    gchar* argv[] = {"/bin/bash", "-c", "/home/ts/gitee/example/spawn/y.sh", NULL};
    GPid child_pid;
    GError* error = NULL;

    gboolean success = g_spawn_async(NULL, argv, NULL, G_SPAWN_DEFAULT, NULL, NULL, &child_pid, &error);
    if (!success) {
        g_print("Failed to spawn process: %s\n", error->message);
        g_error_free(error);
        return EXIT_FAILURE;
    }

    return EXIT_SUCCESS;
}

